def archives
end

def archives_archives
  month = ["","January","February","March","April","May","June","July",
           "August","September","October","November","December"]
  files = []
  ar = {}

  @file_extension.each do |fext|
    files += Dir.glob("#{@datadir}/**/*.#{fext}")
  end

  files.each do |f|
    ti = get_post_time(f)
    if ar[ti.year] then
      if ar[ti.year][ti.mon] then
        ar[ti.year][ti.mon] += 1
      else
        ar[ti.year][ti.mon] = 1
      end
    else
      ar[ti.year] = {}
      ar[ti.year][ti.mon] = 1
    end
  end

  ar = ar.to_a.sort_by {|a| a[0]}

  src = "<ul>\n"
  ar.reverse_each{|year|
    y = year.shift.to_s
    yr = year[0].to_a
    yr.sort_by {|x| x[0]}.reverse_each{|mo|
      m = mo[0] < 10 ? "0" + mo[0].to_s : mo[0].to_s
      src << "<li><a href=\"#{@url}/#{y}/#{m}\">#{month[mo[0]]} #{y}</a></li>"
      # src << "[#{mo[1].to_s}]</li>\n"
    }
  }
  src << "</ul>\n"
  
  return src
end
